<template>
	<el-dialog :title="form.modelName" v-model="open" width="800px" @open="initOpen" append-to-body :before-close="close"
		@close="close">
		<el-form ref="ResettlementRef" :model="form" label-width="120px">
			<el-row>
				<el-col :span="12">
					<el-form-item label="模型名称" prop="modelName">
						{{ form.modelName }}
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否默认" prop="">
						{{ form.isDefault == '0' ? '否' : '是' }}
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="地区" prop="">
						{{ form.range }}
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="维护人" prop="">
						{{ form.createUserName }}
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="维护人单位" prop="">
						{{ form.orgName }}
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="6" class="tab-title">
					{{ form.modelName }}
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="20" :offset="2">
					<div style="margin-top:10px;line-height: 30px;">
						<p style="text-indent: 2em;">黄土高原模型适用于黄土高原地区地震滑坡危险性评估，该模型是利用层次分析法（AHP）确定各影响因子权重，对各因子进行分级赋值、加权叠加分析，进而建立黄土滑坡指数模型，用以评价不同超越概率下黄土发育地区地震滑坡危险性。</p>
						<p>滑坡指数=a×地震动因子+b×地貌因子+c×地层时代因子+d×降雨量因子+e×天然密度因子+f×坡度因子其中：a、b、c、d、e、f为各影响因子权重系数。各影响因子赋值见表。</p>
						<p>1、用AHP方法计算权重系数，黄土高原滑坡区划的影响因子及权重系数如下：</p>
						<table align="center" style="width: 100%;border-collapse: collapse;">
							<tr>
								<td align="center" valign="middle">地震动峰值加速度（g）</td>
								<td align="center" valign="middle">地貌</td>
								<td align="center" valign="middle">地层时代</td>
								<td align="center" valign="middle">降雨量（mm）</td>
								<td align="center" valign="middle">坡度（°）</td>
								<td align="center" valign="middle">天然密度（g/m³）</td>
							</tr>
							<tr>
								<td align="center" valign="middle">0.3834</td>
								<td align="center" valign="middle">0.2734</td>
								<td align="center" valign="middle">0.0599</td>
								<td align="center" valign="middle">0.0878</td>
								<td align="center" valign="middle">0.1543</td>
								<td align="center" valign="middle">0.0412</td>
							</tr>
						</table>
						<p>2、根据影响因子赋值表来进行因子加权叠加分析，生成滑坡指数图。</p>
						<table align="center" style="width: 100%;border-collapse: collapse;">
							<tr>
								<td align="center" width="33%" valign="middle">影响因子</td>
								<td align="center" width="33%" valign="middle">分类</td>
								<td align="center" width="33%" valign="middle">赋值</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="6">地震动峰值加速度（g）</td>
								<td align="center" valign="middle">≥0.6</td>
								<td align="center" valign="middle">6</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[0.4,0.6)</td>
								<td align="center" valign="middle">5</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[0.25,0.4)</td>
								<td align="center" valign="middle">4</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[0.15,0.25)</td>
								<td align="center" valign="middle">3</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[0.05,0.15)</td>
								<td align="center" valign="middle">2</td>
							</tr>
							<tr>
								<td align="center" valign="middle">＜0.05</td>
								<td align="center" valign="middle">1</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="2">地貌</td>
								<td align="center" valign="middle">源、阶地</td>
								<td align="center" valign="middle">1</td>
							</tr>
							<tr>
								<td align="center" valign="middle">梁、峁</td>
								<td align="center" valign="middle">4</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="3">地层时代</td>
								<td align="center" valign="middle" style="font-style: italic;">Q<sub>3</sub>、Q<sub>4</sub>、Q<sub>3+4</sub></td>
								<td align="center" valign="middle">5</td>
							</tr>
							<tr>
								<td align="center" valign="middle" style="font-style: italic;">Q<sub>2+3</sub>、Q<sub>2+3+4</sub></td>
								<td align="center" valign="middle">3</td>
							</tr>
							<tr>
								<td align="center" valign="middle" style="font-style: italic;">Q<sub>2</sub>、Q<sub>1</sub>、Q<sub>1+2</sub></td>
								<td align="center" valign="middle">1</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="6">降雨量（mm）</td>
								<td align="center" valign="middle">≥600</td>
								<td align="center" valign="middle">6</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[500,600)</td>
								<td align="center" valign="middle">5</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[400,500)</td>
								<td align="center" valign="middle">4</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[300,400)</td>
								<td align="center" valign="middle">3</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[200,300)</td>
								<td align="center" valign="middle">2</td>
							</tr>
							<tr>
								<td align="center" valign="middle">＜200</td>
								<td align="center" valign="middle">1</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="6">坡度（°）</td>
								<td align="center" valign="middle">≥30</td>
								<td align="center" valign="middle">6</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[24,30)</td>
								<td align="center" valign="middle">5</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[18,24)</td>
								<td align="center" valign="middle">4</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[12,18)</td>
								<td align="center" valign="middle">3</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[5,12)</td>
								<td align="center" valign="middle">2</td>
							</tr>
							<tr>
								<td align="center" valign="middle">＜5</td>
								<td align="center" valign="middle">1</td>
							</tr>
							<tr>
								<td align="center" valign="middle" rowspan="6">天然密度（g/m³）</td>
								<td align="center" valign="middle">＜1.4</td>
								<td align="center" valign="middle">6</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[1.4,1.5)</td>
								<td align="center" valign="middle">5</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[1.5,1.6)</td>
								<td align="center" valign="middle">4</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[1.6,1.7)</td>
								<td align="center" valign="middle">3</td>
							</tr>
							<tr>
								<td align="center" valign="middle">[1.7,1.8)</td>
								<td align="center" valign="middle">2</td>
							</tr>
							<tr>
								<td align="center" valign="middle">≥1.8</td>
								<td align="center" valign="middle">1</td>
							</tr>
							
						</table>
					</div>
				</el-col>
			</el-row>
		</el-form>
		<template #footer>
			<div class="dialog-footer">
				<el-button type="primary" @click="close">关闭</el-button>
			</div>
		</template>
	</el-dialog>
</template>
<script setup>
import { getResettlementModelById } from '@/api/earthquakeLossesEstimation/earthquakeSetting'

const props = defineProps({
	open: Boolean,
	id: {
		type: String,
		default: ''
	}
})
const emits = defineEmits(['update:open'])
const data = reactive({
	form: {
		modelName: '黄土高原模型',
		isDefault: '1',
		createUserName: '系统默认',
		orgName: '系统默认',
		updateTime: '2022-11-08',
		createTime: '2022-11-08',
		range: '需满足地震地质灾害子系统中地貌、天然密度气象数据完备时使用'
	}
})
const { form } = toRefs(data)
// // 查询模型详情
// const getModelDetail = () => {
// 	getResettlementModelById(props.id).then(res => {
// 		if (res.code == 200) {
// 			res.data && (form.value = res.data)
// 		}
// 	})
// }

const initOpen = () => {
	// getModelDetail()
}
const close = () => {
	emits('update:open', false)
}
</script>
<style scoped lang="scss">
.el-form {
	padding-top: 20px;

	.el-form-item {
		margin-bottom: 0;
	}
}

.tab-title {
	font-size: 16px;
	font-weight: bold;
	border-left: 4px solid var(--el-color-primary);
	font-family: PingFangSC-Medium;
	padding-left: 10px;
	margin: 10px 0;
}

#lineTd {
	background: #fff url() no-repeat 100% center;
}

table td {
	border: 1px solid #c6c6c6;
}
</style>